public class ProxyImage implements Image {
    private String filename;
    private RealImage realImage; // 延迟初始化真实对象
    public ProxyImage(String filename) { this.filename = filename; }
    @Override
    public void display() {
        if (realImage == null) {
            realImage = new RealImage(filename); // 首次访问时加载
        }
        realImage.display();
    }
}
